#ifndef PROPERTY_H
#define PROPERTY_H

#include <deque>

namespace physical
{

/**
  * class property
  * This class defines the basic physical piece of property icluding:
  *  -connections to other properties
  *  -geological location
  *  -...
  */

class property
{
public:         // Constructors/Destructors

    /**
     * Empty Constructor
     */
    property ( );

    /**
     * Other Constructors
     * Description of other what the constructor will do.
     * @param lat is the lattitude of the property
     * @param long is the longitude of the property
     */
    property ( double lattitude = -1.0, double longitude = -1.0 );

    /**
     * Empty Destructor
     */
    virtual ~property ( );


public:         // Public general methods

    /**
     * Gets location of the station using lattitude and longitude. Returns TRUE if
     * successful, else FALSE.
     * @return bool
     * @param  lattitude Lattitude of station.
     * @param  longitude Longitude of station.
     */
    bool getLocation (double lattitude, double longitude );


protected:      // Protected methods

    /**
     * Sets location of the station using lattitude and longitude. Returns TRUE if
     * successful, else FALSE.
     * @return bool
     * @param  lattitude Lattitude of station.
     * @param  longitude Longitude of station.
     */
    bool setLocation (double lattitude = -1.00, double longitude = -1.00 );

    /**
     * Connects this property with another property. Returns TRUE if
     * successful, else FALSE.
     * @return bool
     * @param  otherProperty is a pointer to the other property.
     */
    bool connectProperty(property* otherProperty);

    /**
     * Disconnects this property from another property. Returns TRUE if
     * successful, else FALSE.
     * @return bool
     * @param  otherProperty is a pointer to the other property.
     */
    bool disconnectProperty(property* otherProperty);

    /**
     * Disconnects this property from all other properties. Returns TRUE if
     * successful, else FALSE.
     * @return bool
     */
    bool disconnectAllProperty( );


private:        // Private attribute accessor methods

    /**
     * Set the value of lattitude
     * Lattitude of the station.
     * @param new_var the new value of lattitude
     */
    void setLattitude ( double new_var = -1.0 );

    /**
     * Get the value of lattitude
     * Lattitude of the station.
     * @return the value of lattitude
     */
    double getLattitude ( );

    /**
     * Set the value of longitude
     * Longitude of the station.
     * @param new_var the new value of longitude
     */
    void setLongitude ( double new_var = -1.0 );

    /**
     * Get the value of longitude
     * Longitude of the station.
     * @return the value of longitude
     */
    double getLongitude ( );

    /**
     * Set the value of connectionCount
     * Count of properties this property is connected too.
     * @param new_var the new value of connectionCount
     */
    void setConnectionCount ( int new_var = -1 );

    /**
     * Get the value of connectionCount
     * Count of properties this property is connected too.
     * @return the value of connectionCount
     */
    int getConnectionCount ( );


private:        // Other private functions

    void initAttributes ( ) ;   // This function should initialize all class attributes


private:        // Static Private attributes
private:        // Private attributes

    double lattitude;   // Lattitude of the station
    double longitude;   // Longitude of the station
    int connectionCount;// count of connections with other properties
    std::deque<property*> propertyDeque;    // List of pointer to other connected properties
                                            // Using a deque becasue a physical property probably
                                            //  won't ever connect to too many other properties


}; // end class property

}; // end namespace physical

#endif // PROPERTY_H
